<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript" src="js/jquery.min.js"></script>
	</head>
	<body>
		<div style="width: 80%;margin-left: 10%;">
			<div>
				<a href="addFile.html">添加新的文章</a>
			</div>
			<div style="width: 100%;text-align: center;height: 50px;font-size: 20px;">
				<label>关键字</label>
				<input type="text" id="searchValue"/>
				<button type="button" id="searchBtn">查询</button>
			</div>
			<div>
				<ul id="fileList" style="width: 34%; margin-left: 31%;">
    

					
				</ul>
			</div>
		</div>
		<script>
			
			$(document).ready(function(){ 
				$.ajax({
					url:"http://127.0.0.1:10090/article/findList",
					type:'post',
					data:{},
					dataType:'json',
					success:function(data){
						append(data.obj)
					}
				})
			}); 
			
			
			function append(list){
				var str = '';
				$("#fileList").html('')
				for(var i=0;i<list.length;i++){
					str += '<li><div style="width:100%">'
					str += '<a style="float:left;" href="contentView.html?id='+ list[i].id +'">' + list[i].title +'</a>';
					str += '<a style="float:right" href="editFile.html?id='+ list[i].id +'">编辑</a>'
					str += '</div></li>'
					
					
				}
				
				$("#fileList").html(str)
			}
			
			
			
		</script>
	</body>
</html>
